package com.asura.ops.sync.sdk.consumer;

import lombok.Getter;

/**
 * @author: huyuntao(Mars)
 * @date: 2022/8/10
 * @description: 类的描述
 */
@Getter
public class Result {

    private boolean isSuccess;

    private String errorMsg;

    private Result(boolean isSuccess, String errorMsg) {
        this.isSuccess = isSuccess;
        this.errorMsg = errorMsg;
    }

    public static Result success() {
        return new Result(true, null);
    }

    public static Result fail(String msg) {
        return new Result(false, msg);
    }
}
